import { createRouter, createWebHistory } from "vue-router";
import { isMobile } from "@/utils/tools"
import routes from "./routes.js";
import routesPC from "./routesPC.js";
import routesMO from "./routesMO.js";
 
const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_APP_PATH),
  // routes: isMobile()? routesMO : routesPC,
  routes
});
 
// 路由守卫
// router.beforeEach(async (to, from, next) => {
//   next();
// });
 
export default router;